package com.example.workshop.lesson5;

import com.example.workshop.lesson5.Filter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class RecommenderImplementation {
   @Autowired
   //通过名字来自动装配
    private Filter contentBasedFilter;

//    public RecommenderImplementation(Filter contentBaseFilter) {
//        super();
//        this. contentBaseFilter= contentBaseFilter;
//    }

    public String [] recommendMovies(String movie){
        //打印正在使用的接口名称
        System.out.println("打印正在使用的Filter是："+contentBasedFilter+"\n");

       String results[]= contentBasedFilter.getRecommendations("流浪地球");

       return results;
    }
}
